package common.result;

import lombok.Data;

@Data
public class ResponseResult<T> {
    private int code;
    private String message;
    private T data;

    public ResponseResult(int code, T data) {
        this.code = code;
        if (code == CodeEnum.SUCCESS.getCode()) {
            this.message = "success";
        } else {
            this.message = "fail";
        }
        this.data = data;
    }
}
